package controller;

import java.util.Random;

public class CreateCode {

	public static String getCode() {
		//随机函数
		Random ra = new Random();
		String str = "";
		//用数组保存验证码中出现的字符
		String[] arr = {"1","2","3","4","8","0","a","c","v","t"
				,"Q","W","C","F","S","Y","h","k"};
		//循环，拼接生成字符串
		for(int i=0; i<5; i++) {
			str += arr[ra.nextInt(15)];
		}
		return str;
	}
}
